/**
 * 数组去重复
 * @param {*} arr 
 */
export function unique(arr) {
    var newArr = [];
    for(var i = 0; i < arr.length; i++){
        for(var j = i+1; j < arr.length; j++){
            if(arr[i] == arr[j]){
                ++i;
            }
        }
        newArr.push(arr[i]);
    }
    return newArr;
}


export function removeByVal(arrylist , val) {
	for(var i = 0; i < arrylist .length; i++) {
		if(arrylist [i] == val) {
			arrylist.splice(i, 1);
			break;
		}
    }
    return arrylist;
}
